<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .shake {
      width: 40px;
      height: 40px;
      display: block;
      background: lightgreen;
      border-radius: 50%;
      margin: 100px;
      color: #fff;
      font-size: 24px;
      text-align: center;
      line-height: 40px;
      cursor: pointer;
      transition: all 0.25s;
    }

    .shake:hover {
      animation: shake 0.25s;
      background: lightblue;
    }

    @keyframes shake {
      0%,
      10%,
      55%,
      90%,
      94%,
      98%,
      100% {
        -webkit-transform: scale(1, 1);
      }

      30% {
        -webkit-transform: scale(1.14, 0.86);
      }

      75% {
        -webkit-transform: scale(0.92, 1.08);
      }

      92% {
        -webkit-transform: scale(1.04, 0.96);
      }

      96% {
        -webkit-transform: scale(1.02, 0.98);
      }

      99% {
        -webkit-transform: scale(1.01, 0.99);
      }
    }
  </style>
</head>

<body>
  <span class="shake">弹</span>
</body>

</html>